import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * userfeedback模块-用户反馈信息
 */
@Entity('userfeedback_info')
export class UserFeedbackInfoEntity extends BaseEntity {
  @Column({ comment: '反馈内容', type: 'text' })
  feedbackContent: string;

  @Column({ comment: '反馈类型 0-建议 1-投诉 2-其他', default: 0, type: 'tinyint' })
  feedbackType: number;

  @Column({ comment: '反馈时间', type: 'datetime' })
  feedbackTime: Date;

  @Column({ comment: '处理状态 0-未处理 1-处理中 2-已处理', default: 0, type: 'tinyint' })
  processStatus: number;

  @Column({ comment: '处理人', nullable: true })
  processor: string;

  @Column({ comment: '处理时间', type: 'datetime', nullable: true })
  processTime: Date;

  @Index()
  @Column({ comment: '联系方式', length: 50 })
  contactInfo: string;

  @Index()
  @Column({ comment: '用户ID' })
  userId: number;

  @Column({ comment: '备注', nullable: true })
  remark: string;
}
